<h3>Current Promotions</h3>
<?php if(count($current_promotions) === 0): ?>
<p>There are currently no active promotions.</p>
<h3>
<?php echo Html::anchor('admin/promotions/new/', 'Create New Promotion'); ?>
</h3>
<?php else: ?>
<table>
<tr>
	<th>Description</th>
	<th>Discount Type</th>
	<th>Discount</th>
	<th>Starting Date</th>
	<th>Ending Date</th>
	<th>Actions</th>
</tr>
<tr>
<td>
<?php echo Html::anchor('admin/promotions/new/', 'Create New Promotion'); ?>
</td>
</tr>
<?php foreach($current_promotions as $promotion): ?>
<tr>
	<td><?php echo $promotion->description;?></td>
	<td><?php echo $promotion->discount_type;?></td>
	<td><?php echo $promotion->discount;?></td>
	<td><?php echo gmdate('m/d/Y', $promotion->starting_date);?></td>
	<td><?php echo gmdate('m/d/Y', $promotion->ending_date);?></td>
	<td><?php echo Html::anchor('admin/promotions/cancel/'.$promotion->id, 'Cancel Promotion');?>
</tr>
<?php endforeach; ?>
</table>
<?php endif;?>